/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class LightStrip {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010010024';
    }

    get categoryName() {
        return '\u706f\u5e26';
    }

    getBrightness(params) {
        return command({
            method: 'getBrightness',
            methodId: 'pdN7w42x',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFlashDuration(params) {
        return command({
            method: 'getFlashDuration',
            methodId: 'pghzV1XV',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getFlashTimes(params) {
        return command({
            method: 'getFlashTimes',
            methodId: 'ptRSAuuG',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRgbColor(params) {
        return command({
            method: 'getRgbColor',
            methodId: 'p1vFkq1L',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pDrhxk3S',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setBrightness(params) {
        return command({
            method: 'setBrightness',
            methodId: 'pGoxubEZ',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setFlashDuration(params) {
        return command({
            method: 'setFlashDuration',
            methodId: 'pUPQQGAr',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setFlashTimes(params) {
        return command({
            method: 'setFlashTimes',
            methodId: 'pZgRgx5d',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setRgbColor(params) {
        return command({
            method: 'setRgbColor',
            methodId: 'peHyXjYC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppAXpyNA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default LightStrip;
